//
//  shopTableViewCell.m
//  UI_HLJ_Frame
//
//  Created by dlios on 15-7-6.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import "shopTableViewCell.h"

#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation shopTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        // 建立imageView
        self.ImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.ImageView];
//        self.ImageView.backgroundColor = [UIColor orangeColor];
        self.ImageView.layer.borderWidth = 0.3;
        self.ImageView.layer.cornerRadius = 10;
        self.ImageView.layer.masksToBounds = YES; // 隐藏边角
        [_ImageView release];
        
        // 建立label
        // 建立标题
        self.labelBT = [[UILabel alloc] init];
        [self.contentView addSubview:self.labelBT];
//        self.labelBT.backgroundColor = [UIColor orangeColor];
        [_labelBT release];
        
        // 建立套餐label
        self.labelTC = [[UILabel alloc] init];
        [self.contentView addSubview:self.labelTC];
//        self.labelTC.backgroundColor = [UIColor orangeColor];
        self.labelTC.font = [UIFont systemFontOfSize:12];
        [_labelTC release];
        
        // 建立案例label
        self.labelAL = [[UILabel alloc] init];
        [self.contentView addSubview:self.labelAL];
//        self.labelAL.backgroundColor = [UIColor orangeColor];
        self.labelAL.font = [UIFont systemFontOfSize:12];
        [_labelTC release];
        
        // 建立关注label
        self.labelGZ = [[UILabel alloc] init];
        [self.contentView addSubview:self.labelGZ];
//        self.labelGZ.backgroundColor = [UIColor orangeColor];
        self.labelGZ.font = [UIFont systemFontOfSize:12];
        [_labelGZ release];
        
        
    }
    return self;
}

- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    
    self.ImageView.frame = CGRectMake(WIDTH / 38, 10, WIDTH / 3, 80);
    
    // 固定的label
    self.labelBT.frame = CGRectMake(WIDTH / 35 + WIDTH / 3 + 10, 10, WIDTH * 1.5 / 3, 30);
    
    self.labelTC.frame = CGRectMake(WIDTH / 35 + WIDTH / 3 + 10, 70, WIDTH * 2 / 10, 20);
    self.labelAL.frame = CGRectMake(WIDTH * 7 / 35 + WIDTH / 3 + 10, 70, WIDTH * 2 / 10, 20);
    self.labelGZ.frame = CGRectMake(WIDTH * 15 / 35 + WIDTH / 3 + 10, 70, WIDTH * 3 / 10, 20);

}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
